<template>
  <el-container>
    <el-header style="padding: 0; height: 100%">
      <div class="searchBox">
        <el-input
          v-model="key"
          size="small"
          suffix-icon="el-icon-search"
          class="einput"
        />
        <div class="daoButton">
          <img src="@/assets/daochu.png" alt="" />
          <span>全部导出</span>
        </div>
      </div>
    </el-header>
    <el-main>
      <!-- :tableData="result.slice((curPage - 1) * pageSize, curPage * pageSize)" -->
      <el-table
        :data="tableData.slice((curPage - 1) * pageSize, curPage * pageSize)"
        stripe
        border
        style="width: 100%"
        class="eltable"
      >
        <el-table-column label="序号" width="100" type="index" />
        <el-table-column prop="city" label="市县名" width="180" />
        <el-table-column prop="village" label="村庄名" />
        <el-table-column prop="time" label="数据下发时间" />
        <el-table-column prop="resu" label="审核结果">
          <template slot-scope="scope">
            <el-button type="text" class="redbutton" @click="bbb(scope.row.id)"
              >查看详情</el-button
            >
          </template>
        </el-table-column>
      </el-table>

      <el-pagination
        v-if="tableData.length > 0"
        class="elpagi"
        :total="tableData.length"
        :current-page.sync="curPage"
        :page-size="pageSize"
        :pager-count="7"
        layout="total, prev, pager, next, jumper"
      />
    </el-main>
  </el-container>
</template>
<script>
// 在办箱
import tableHeader from "../components/TableHeader";
import { mapGetters } from "vuex";
export default {
  components: {
    tableHeader,
  },
  computed: {
    ...mapGetters(["citylist"]),
  },
  data() {
    return {
      options: [],
      value: 0,
      name: "",
      currentLiIndex: 0,
      pageSize: 10,
      curPage: 1,
      cityChildren: [],
      tableData: [
        {
          city: "2016-05-02",
          village: "王小虎",
          time: "上海市普陀区金沙江路 1518 弄",
          area: "",
          rate: "",
          resu: "",
        },
        {
          city: "2016-05-02",
          village: "王小虎",
          time: "上海市普陀区金沙江路 1518 弄",
          area: "",
          rate: "",
          resu: "",
        },
      ],
    };
  },
  mounted() {},
  methods: {},
};
</script>
<style lang="scss" scoped>
@import "../../../../public/css/table.scss";

.redbutton {
  padding: 5px 10px;
  background-color: #ff4500;
  color: #fff;
}
</style>
